/*
 * @Author: xmily
 * @Date: 2022-02-14 02:12:45
 * @LastEditors: xmily
 * @LastEditTime: 2023-05-09 19:37:23
 * @FilePath: \glxxapi\models\AfterClassService\lesson.js
 * @Description: 
 * 
 * Copyright (c) 2022 by xmily/mxthink.com.cn, All Rights Reserved. 
 */
//课后服务开设的社团表
var mongoose = require('../../cfg/dbconfig.js')

var lessonSchema=new mongoose.Schema({
    schoolname:String,
    lessonname:String,
    teacher:String,
    classroom:String,
    term:String,
    limit:Array,
    type:String,
},{collection:'aftclsvr_lesson'})

lessonSchema.statics.GetByQuery=async function(query,fields){
    let result= await this.find(query,fields).exec();
    return result
}


module.exports = mongoose.model('aftclsvr_lesson', lessonSchema)